################
``topology.yml``
################

.. list-table::
   :widths: auto

   * - YAML File
     - ``topology.yml``
   * - Loader Class
     - :class:`yaml.SafeLoader`
   * - Python Module
     - :mod:`ng911ok.lib.topology`
   * - Python Variable
     - :data:`~ng911ok.lib.topology.topology_config`

The topology rules applied to the feature dataset(s) are specified in the ``topology.yml`` file.

YAML Structure
==============

Top-Level Keys
--------------

.. list-table::
   :widths: auto

   * - ``exception_field``
     - Field whose values indicate which features are exempt from certain topology rules.
   * - ``exception_domain``
     - Domain of ``exception_field``.
   * - ``required_dataset_topology_name``
     - Name to be used for the topology in the required feature dataset.
   * - ``optional_dataset_topology_name``
     - Name to be used for the topology in the optional feature dataset.
   * - ``required_dataset_rules``
     - Sequence of mappings, each declaring a topology rule for the required feature dataset. Each entry should have a ``rule`` key set to an `allowed value <https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/add-rule-to-topology.htm#GUID-25A3A51B-FC9C-478E-9877-679A78FBBA88>`_ for the ``rule_type`` parameter of the ``arcpy.management.AddRuleToTopology`` function. Each entry should also have either a single ``member`` key or both ``member1`` and ``member2`` keys set to the ``role`` attribute(s) of feature class(es) subject to the rule.

Tags
----

Constructors are registered in :mod:`ng911ok.lib.topology`.

.. list-table::
   :widths: auto

   * - ``!TopologyConfig``
     - Applied to the whole document.
   * - ``!FieldRole``
     - Inserts the :class:`~ng911ok.lib.config_dataclasses.NG911Field` instance with the role provided.
   * - ``!DomainName``
     - Inserts the :class:`~ng911ok.lib.config_dataclasses.NG911Domain` instance with the name provided.

Anchors
-------

No anchors are used in ``topology.yml``.

Python Implementation
=====================

\...